﻿@model PSU.Model.Areas.Administrator.School.DepartmentEditViewModel
@using PSU.Model.Areas
@{
    ViewData["Title"] = "部门信息";
    ViewData["NavTitle"] = "学校信息管理";
    ViewData["CurrName"] = "部门信息维护";
}

@section styles{
    <environment include="Development">
        <link href="~/css/template/simditor.css" rel="stylesheet" />
    </environment>
    <environment exclude="Development">
        <link href="~/css/template/simditor.min.css" rel="stylesheet" asp-append-version="true" />
    </environment>
}

<section class="content-header">
    <h1>
        院系/部门信息
        <small>Department Information</small>
    </h1>
    <ol class="breadcrumb">
        <li>
            <a asp-area="Administrator" asp-controller="Home" asp-action="Index">
                <i class="fa fa-dashboard"></i> 首页
            </a>
        </li>
        <li>学校信息</li>
        <li class="active">
            <a asp-area="Administrator" asp-controller="School" asp-action="Department">
                院系/部门信息
            </a>
        </li>
        <li class="active">编辑</li>
    </ol>
</section>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" role="form" id="department_form">
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-default">
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="name">
                                        <span class="required-label">*</span> 部门/院系名称
                                    </label>
                                    <div class="col-md-3">
                                        <input class="form-control" id="name" type="text" placeholder="" asp-for="Name" maxlength="20">
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="tel">
                                        <span class="required-label">*</span> 联系电话
                                    </label>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input type="text" class="form-control" id="tel" asp-for="Tel" maxlength="20"/>
                                            <span class="input-group-addon">
                                                <i class="fa fa-phone fa-flip-horizontal grey"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="weibo"> 官方微博 </label>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input id="weibo" class="form-control" type="text" asp-for="Weibo" maxlength="50"/>
                                            <span class="input-group-addon">
                                                <i class="fa fa-weibo text-red"></i>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="email">电子邮箱</label>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input type="email" id="email" class="form-control" asp-for="Email" />
                                            <span class="input-group-addon">
                                                <i class="fa fa-envelope text-yellow"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="wechat"> 公众号 </label>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input type="text" id="wechat" class="form-control" asp-for="Wechat" maxlength="50"/>
                                            <span class="input-group-addon">
                                                <i class="fa fa-weixin text-green"></i>
                                            </span>
                                        </div>
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="qq">官方QQ</label>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input type="text" id="qq" class="form-control" asp-for="QQ" maxlength="20"/>
                                            <span class="input-group-addon">
                                                <i class="fa fa-qq fa-flip-horizontal text-light-blue"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="enable"> 是否为部门 </label>
                                    <div class="col-md-3">
                                        <select id="branch" asp-items="@Html.GetEnumSelectList(typeof(EnumType.Branch))" class="form-control" asp-for="IsBranch"></select>
                                    </div>
                                    <label class="col-md-2 control-label no-padding-right" for="enable"> 是否启用 </label>
                                    <div class="col-md-3">
                                        <select id="enable" asp-items="@Html.GetEnumSelectList(typeof(EnumType.Enable))" class="form-control" asp-for="IsEnabled"></select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label no-padding-right" for="address">办公地址</label>
                                    <div class="col-md-5">
                                        <div class="input-group">
                                            <input type="text" id="address" class="form-control" asp-for="Address" maxlength="100"/>
                                            <span class="input-group-addon">
                                                <i class="fa fa-map-marker"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="box box-solid">
                            <div class="box box-header">
                                <div class="box-title">详细信息</div>
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-md-12 col-xs-12">
                                            <textarea id="editor" class="form-control" asp-for="Introduction" maxlength="500"></textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix">
                    <div class="text-right">
                        <a class="btn btn-success" id="save" data-id="@Model.Id">
                            <i class="fa fa-check"></i>
                            保存
                        </a>
                        &nbsp;&nbsp;
                        <a class="btn btn-default" asp-area="Administrator" asp-controller="School" asp-action="Department">
                            <i class="fa fa-undo"></i>
                            返回
                        </a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>

@section scripts{
    <environment include="Development">
        <script src="~/javascript/template/module.js"></script>
        <script src="~/javascript/template/hotkeys.js"></script>
        <script src="~/javascript/template/uploader.js"></script>
        <script src="~/javascript/template/simditor.js"></script>
        <script src="~/javascript/view/Administrator/editdepartment.js" asp-append-version="true"></script>
    </environment>
    <environment exclude="Development">
        <script src="~/javascript/view/Administrator/editdepartment.min.js" asp-append-version="true"></script>
    </environment>
}
